home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / UTILITY / LACE_14.ARJ / SET.DOC < prev    next >
Text File  |  1992-06-09  |  6KB  |  227 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.                                SET.SYS and ENVIRON.SYS
  9.  
  10.                    Setting Environment Variables Inside CONFIG.SYS
  11.  
  12.  
  13.                              A Companion Program to LACE
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.                               _______
  21.                          ____|__     |               (tm)
  22.                       --|       |    |-------------------
  23.                         |   ____|__  |  Association of
  24.                         |  |       |_|  Shareware
  25.                         |__|   o   |    Professionals
  26.                       -----|   |   |---------------------
  27.                            |___|___|    MEMBER
  28.  
  29.  
  30.  
  31.                              Written by Keith Ledbetter
  32.                                  4240 Ketcham Drive
  33.                                Chesterfield, VA  23832
  34.                                    (804) 674-0780
  35.                            (6:00pm - 10:00pm Eastern Time)
  36.  
  37.  
  38.  
  39.                          Tech Support BBS:   Blue Ridge Express
  40.                                              804-790-1675
  41.                                              30 Phone Lines (2400 bd)
  42.                                              Sub-board KEITHL
  43.                                              ("J KEITHL")
  44.  
  45.  
  46.                       Electronic mail on  GEnie: ORION.MICRO
  47.                                      Compuserve: 72240,1221
  48.                                             AOL: KLedbetter
  49.  
  50.  
  51.                             Program and Documentation are
  52.           Copyright (c) 1992 by Keith Ledbetter.  All rights reserved.
  53.  
  54.  
  55.                      Portions Copyright Borland, International.
  56.                            Written with Borland C/C++ 3.0.
  57.  
  58.  
  59.  
  60.                                     Introduction
  61.                                     ------------
  62.  
  63.  
  64.                The ENVIRON.SYS and SET.SYS drivers included with your  LACE
  65.           package allow you to set  environment variables from inside  your
  66.           CONFIG.SYS file.  The LACE_SET program is used to retrieve  these
  67.           settings and then place them in your master environment (normally
  68.           from your AUTOEXEC.BAT file).
  69.  
  70.  
  71.  
  72.                                     How it Works
  73.                                     ------------
  74.  
  75.  
  76.                Before you can SET environment variables, you must load  the
  77.           ENVIRON.SYS device driver.  This driver stays memory resident and
  78.           does the actual storage of the environment variables that  you've
  79.           specified in your CONFIG.SYS file (you can set up to 128 bytes of
  80.           environment variables).  The ENVIRON driver is very small, taking
  81.           up only around 280 bytes of your precious memory.
  82.  
  83.  
  84.                After loading ENVIRON.SYS,  you merely call  SET.SYS to  set
  85.           environment variables.   The  syntax is  identical to  DOS's  SET
  86.           command, as in:
  87.  
  88.                     device=c:\lace\SET.Sys The_Variable=The_Value
  89.  
  90.  
  91.                In  your  AUTOEXEC.BAT  file,  you  then  run  the  LACE_SET
  92.           program.  This program does two things:
  93.  
  94.           1.   It sets  the LACE  variable automatically  to the  selection
  95.           number that you chose from LACE's boot-up menu.
  96.  
  97.           2.   It places any environment variables you set into the command
  98.           processor's master environment.
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.           Setting Environment Variables from CONFIG.SYS         Page 1
  114.  
  115.  
  116.  
  117.  
  118.                                      An Example
  119.                                      ----------
  120.  
  121.                In this example, we'll use the  ASK device driver to  prompt
  122.           the user for two configuration questions:
  123.  
  124.  
  125.           DOS     = High
  126.           device  = c:\qemm\qemm386.sys ram
  127.           shell   = c:\4dos\4dos.com /p @c:\4dos\4dos.ini
  128.  
  129.           device  = c:\lace\environ.sys
  130.           device  = c:\lace\lace.sys Center NumOff
  131.           device  = LACE SelectionBarBackground=RED
  132.  
  133.           device  = LACE "S\tandard configuration"
  134.             device = d:\ms_mouse\mouse.sys /y /s30
  135.             device = c:\caches\mycache.sys 4096
  136.             device = c:\dos50\ansi.sys
  137.             device = c:\dos50\setver.exe
  138.  
  139.             device = c:\lace\ask.sys "Load a RAMdisk? "
  140.             device = YES
  141.               device = c:\dos50\ramdrive.sys 2048
  142.               device = c:\lace\set.sys RAMDISK=YES
  143.             device = NO
  144.               device = c:\lace\set.sys RAMDISK=NO
  145.             device = END
  146.  
  147.             device = c:\lace\ask.sys "Load the network? "
  148.             device = YES
  149.               device = c:\netlib\netdrvr.sys
  150.               device = c:\lace\set.sys NETWORK=YES
  151.             device = NO
  152.               device = c:\lace\set.sys NETWORK=NO
  153.             device = END
  154.  
  155.           device = LACE "B\are-bones configuration"
  156.             device = c:\lace\set.sys RAMDISK=NO
  157.             device = c:\lace\set.sys NETWORK=NO
  158.             device = c:\dos50\ansi.sys
  159.             device = c:\dos50\setver.exe
  160.  
  161.           device = LACE End
  162.  
  163.           buffers   = 5
  164.           files     = 60
  165.           break     = on
  166.           STACKS    = 0,0
  167.           lastdrive = E
  168.  
  169.  
  170.           Setting Environment Variables from CONFIG.SYS         Page 2
  171.  
  172.  
  173.  
  174.  
  175.                Then, in the AUTOEXEC.BAT file:
  176.  
  177.  
  178.  
  179.           c:\lace\lace_set
  180.           ...
  181.           ...   do whatever
  182.           ...
  183.  
  184.           if NOT "%RAMDISK%" == "YES" goto no_ramDISK
  185.           ...
  186.           ...  load the ramdisk
  187.           ...
  188.  
  189.           :no_ramDISK
  190.           if NOT "%NETWORK" == "YES" goto no_network
  191.           ...
  192.           ...  log onto the network
  193.           ...
  194.  
  195.           :no_network
  196.           ...
  197.           ...  rest of your statements
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.                                     In Conclusion
  207.                                     -------------
  208.  
  209.                Don't forget  that  you  MUST load  the  ENVIRON.SYS  driver
  210.           before calling the SET.SYS driver.   If you have any  suggestions
  211.           for future  enhancements, please  don't  hesitate to  contact  me
  212.           about them.
  213.  
  214.  
  215.  
  216.                                                        Enjoy!
  217.  
  218.                                                             Keith
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.           Setting Environment Variables from CONFIG.SYS         Page 3